package 力扣._00周赛._375周赛.问题1;

class Solution {
    public int countTestedDevices(int[] batteryPercentages) {
        int r = 0;
        int menkai = 0;//当前测试门槛
        for (int i = 0; i < batteryPercentages.length; i++) {
            if (batteryPercentages[i] > menkai) {
                r++;
                menkai++;
            }
        }
        return r;
    }
}